#!/usr/bin/perl -w
#Jimmy Saw - 10-01-2007 

use Bio::SearchIO;

my $in = new Bio::SearchIO(-format => 'hmmer', -file => $ARGV[0]);

while(my $result = $in->next_result){
    while(my $hit = $result->next_hit){
        while(my $hsp = $hit->next_hsp){
            print $result->query_name(), "\t", $hsp->start(), "\t", $hsp->end(), "\t", $hsp->evalue(), "\t", $hsp->score(), "\t", $hit->name, "\t", $hit->description, "\n" ; 
        }
    }
}
